package club.hicode.daydayup.feign.consumer.invoker;

import club.hicode.daydayup.feign.vo.StudentVo;
import feign.Headers;
import feign.Param;
import feign.RequestLine;

import java.util.List;
import java.util.Map;

/**
 * 学生操作的API
 * https://www.jianshu.com/p/3d597e9d2d67
 *
 * @author Liu Chunfu
 * @date 2018-07-05 下午3:49
 **/
public interface StuApi {

    @Headers("Content-Type: application/json")
    @RequestLine("GET /stu?id={id}")
    StudentVo getBook(@Param("id") String id);


    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @RequestLine("DELETE /stu")
    StudentVo del(String id);

    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @RequestLine("POST /stu")
    StudentVo postBook(StudentVo bookVo);

    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @RequestLine("POST /stu/map")
    Map<String, StudentVo> postBook(List<StudentVo> bookVo);
}
